/**
 * 
 */
package com.gragra.parseOptions;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
/**
 * @author Christoph Teichmann
 * 23.04.2013
 */
public class ListOfIntegerOption extends DescribeAtCreationOption
{
	/**
	 * 
	 */
	private int[] settings = null;
	/**
	 * @return the settings
	 */
	public int[] getSettings()
	{return this.settings;}
	/**
	 * @param description
	 */
	public ListOfIntegerOption(String description)
	{super(description);}
	/* (non-Javadoc)
	 * @see com.gragra.parseOptions.OptionInformation#processArguments(it.unimi.dsi.fastutil.objects.ObjectArrayList)
	 */
	@Override
	public void processArguments(ObjectArrayList<String> arguments)
			throws CommandLineException
	{
		if(arguments != null && arguments.size() > 0)
		{
			this.settings = new int[arguments.size()];
			for(int i=0;i<settings.length;++i)
			{this.settings[i] = Integer.parseInt(arguments.get(i));}
		}
	}
	/* (non-Javadoc)
	 * @see com.gragra.parseOptions.OptionInformation#hasBeenSet()
	 */
	@Override
	public boolean hasBeenSet()
	{return settings != null;}
}